Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: chat auto, gracefully handle when str not found #781

Merged
merged 2 commits into from
Oct 24, 2023
Merged

Conversation

elboy3
Copy link
Contributor

@elboy3 elboy3 commented Oct 24, 2023

.find() returns -1 if str is not found, so the min was returning -1 for first turn of all chats

this gracefully handles first turn, so that if find returns -1 we just take the last 512 tokens

@elboy3 elboy3 requested review from dcaustin33 and a team as code owners October 24, 2023 19:43
@elboy3 elboy3 force-pushed the fix/str-not-found branch from 7d2d0d8 to 17ffc1e Compare October 24, 2023 19:44
@elboy3 elboy3 merged commit 5c4cc7e into main Oct 24, 2023
3 checks passed
@elboy3 elboy3 deleted the fix/str-not-found branch October 24, 2023 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants